package com.案例.复制视频;

import lombok.SneakyThrows;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;

public class Demo {
    @SneakyThrows
    public static void main(String[] args) {
        //读取视频信息
        BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream("C:\\Users\\lsc1999\\Desktop\\ll.mp4"));

        //本模块创建复制视频
        BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(new FileOutputStream("lll.mp4"));

        byte[] bytes = new byte[1024];
        int by;
        while ((by = bufferedInputStream.read(bytes)) != -1) {
            bufferedOutputStream.write(bytes, 0, by);
        }
        bufferedInputStream.close();
        bufferedOutputStream.close();

    }
}
